home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / uupc11v3.zip / SU.CMD < prev    next >
OS/2 REXX Batch file  |  1992-06-05  |  4KB  |  77 lines

  1. @echo off
  2. REM *------------------------------------------------------------------*
  3. REM *   Program:        su.bat          03 Nov 1990                    *
  4. REM *   Author:         Andrew H. Derbyshire                           *
  5. REM *   Address:        help@kendra.kew.com                            *
  6. REM *   Function:       Demonstration of multiple user support         *
  7. REM *                   with UUPC/extended                             *
  8. REM *------------------------------------------------------------------*
  9. REM *  This command file provides a simple example of changing the *
  10. REM *  active user id (the user id used when sending mail) in      *
  11. REM *  UUPC/extended.  It assumes:                                 *
  12. REM *                                                              *
  13. REM *  1) The configuration directory is C:\LIB\UUPC,              *
  14. REM *                                                              *
  15. REM *  2) That each user has a PERSONAL.RC file under under his    *
  16. REM *     under own name in the configuration directory.           *
  17. REM *                                                              *
  18. REM *  3) The MS-DOS environment has enough space free to save an  *
  19. REM *     extra copy of the DOS prompt and the current UUPCUSRC    *
  20. REM *     variable.                                                *
  21. REM *                                                              *
  22. REM *  4) A copy of COMMAND.COM can be invoked via the COMSPEC     *
  23. REM *     variable.                                                *
  24. REM *--------------------------------------------------------------*
  25. REM *       If the user didn't invoke us properly, give help       *
  26. REM *--------------------------------------------------------------*
  27. if not "%1" == ""   goto ok
  28. echo Syntax:   %0 userid command
  29. echo The command is optional; if not specified, a sub-shell will be
  30. echo invoked.  An example:
  31. echo           %0 postmast mail
  32. goto quit
  33. REM *--------------------------------------------------------------*
  34. REM *                Save the current environment                  *
  35. REM *--------------------------------------------------------------*
  36. :ok
  37. SET UUPCPRMPT=%prompt%
  38. SET UUPCUSRRX=%UUPCUSRRC%
  39. REM *------------------------------------------------------------------*
  40. REM *   Change the following line if your UUPC PERSONAL.RC files       *
  41. REM *                    aren't in C:\uupc                         *
  42. REM *------------------------------------------------------------------*
  43. SET UUPCUSRRC=e:\uupc\%1.rc
  44. REM *------------------------------------------------------------------*
  45. REM *                    Verify the file exists                        *
  46. REM *------------------------------------------------------------------*
  47. if not exist %UUPCUSRRC% goto error
  48. PROMPT Enter EXIT to logout from %1$_%UUPCPRMPT%
  49. REM *------------------------------------------------------------------*
  50. REM *   Make the text window bigger (use a neat program that comes     *
  51. REM *   with KEDIT from Mansfield Software.)                           *
  52. REM *------------------------------------------------------------------*
  53. if exist e:\kedit\textwin.exe textwin maximize
  54. REM *------------------------------------------------------------------*
  55. REM *            Run a sub-shell with the new variables                *
  56. REM *------------------------------------------------------------------*
  57. if "%2" == "" goto shell
  58. %2 %3 %4 %5 %6 %7 %8 %9
  59. goto exit
  60. :shell
  61. %comspec%
  62. goto exit
  63. REM *------------------------------------------------------------------*
  64. REM *             Come here to issue an error message                  *
  65. REM *------------------------------------------------------------------*
  66. :error
  67. echo %UUPCUSRRC% doesn't exist!  Please verify %1 is a valid user.
  68. REM *------------------------------------------------------------------*
  69. REM *                   Reset variables and exit                       *
  70. REM *------------------------------------------------------------------*
  71. :exit
  72. PROMPT %UUPCPRMPT%
  73. SET UUPCUSRRC=%UUPCUSRRX%
  74. SET UUPCPRMPT=
  75. SET UUPCUSRRX=
  76. :quit
  77.